#include "nixie.h"
int DU_MA[20] = {0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71,0x76,0x38,0x40,0x00};
    // 位码数据
    int WE_MA[9] = {0xFF , 0xFE , 0xFD , 0xFB , 0xF7 , 0xEF , 0xDF , 0xBF , 0x7F};


void Show_Nixe(char DU ,char WE)
{
		WE_LE = 1;
		Nixie = WE_MA[WE];
		WE_LE = 0;
		
		DU_LE = 1;
		Nixie = DU_MA[DU];
		DU_LE = 0;
		Delay1ms(2);

		
}
/****************************************************************
**************************************************************/
void Show_Num(unsigned long Data_Num)
{
	int Data[8] = {0};
	int i = 0;
	int j = 0;
	
	do{
		Data[i++] = Data_Num %10;
		Data_Num/=10;
	}
	while(Data_Num > 0 && i < 8);
	for(j = 0; j < i ; j++)
	{
	Show_Nixe(Data[j],8-j );
	}
	for(j = i; j < 8; j++)
	{
	Show_Nixe(19, 8 - j);
	}
}